<template>
	<div class="card">
		<el-card :shadow="props.shadow">
			<template v-if="props.title" #header>
				<div class="flex justify-between">
					<HyTitle :title="title" />
					<slot name="topRight"></slot>
				</div>
			</template>
			<slot name="default"></slot>
		</el-card>
	</div>
</template>

<script lang="ts" setup>
import HyTitle from './CardTitle.vue';
const props = defineProps({
	shadow: {
		type: String,
		default: 'hover',
	},
	title: {
		type: String,
		default: '',
	},
});
</script>
<style scoped lang="scss">
.card {
	:deep(.el-card__header) {
		padding: 5px 10px;
	}

	:deep(.el-card__body) {
		padding: 20px 10px;
	}
}
</style>
